#include <stdio.h>

int main(int argc, char *argv[]) {

    int a, b, sum, sub, mul, div,rem;

    scanf("%d %d", &a, &b);

    sum = a + b;
    sub = a - b;
    mul = a * b;
    div = a / b;
    rem = a % b;
    printf("%d %d %d %d %d", sum, sub, mul, div, rem);
    
    return 0;
}